<html>
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="http://xnimg.cn/n/core/base-all.js"></script>
<script>
	object.use('dom, ui', function(exports, dom, ui) {

		var MyComponent = new Class(ui.Component, function() {
			this.title = ui.define('.title');
			this.foo = ui.option('haha');
		});

		var template = '<div class="text"><h3 class="title">{{foo}}</h3></div>';
		var c = new MyComponent(template, {
			foo: 'jij'
		});

		dom.ready(function() {
			document.body.appendChild(c.getNode());
		});

	});
</script>
</head>
<body>
</body>
</html>

